﻿using System.Collections.Generic;

namespace NlpTrainApp.Dal
{
    /// <summary>
    /// 无法兼容sql语句列表
    /// </summary>
    public static class SqlLists
    {
        private static readonly Dictionary<string, string> sqls = new Dictionary<string, string>();
        /// <summary>
        /// Initializes a new instance of the <see cref="SqlLists"/> class.
        /// </summary>
        static SqlLists()
        {
            sqls.Add("getversion" + FreeSql.DataType.SqlServer.ToString(), "select @@VERSION");
            sqls.Add("getversion" + FreeSql.DataType.MySql.ToString(), "select version() from dual");
            sqls.Add("getversion" + FreeSql.DataType.Dameng.ToString(), "SELECT top 1 * FROM V$VERSION");
        }
        /// <summary>
        /// Gets the version.
        /// </summary>
        /// <param name="dataType">Type of the data.</param>
        /// <returns></returns>
        public static string GetVersion(FreeSql.DataType dataType)
        {
            return sqls["getversion" + dataType.ToString()];
        }
    }
}
